#include <bits/stdc++.h>
using namespace std;

int hx[10000010] = {};

signed main() {
    int n = 0,q = 0;
    cin >> n >> q;
    for(int i = 0;i < n; ++ i) {
        int num = 0;
        cin >> num;
        hx[num] ++;
    }
    for(int i = 0;i < q;++ i ) {
        int j = 0;cin >> j;
        if(hx[j]) cout << "yes" << endl;
        else cout << "no" << endl;
    }
}